package com.bo.lock.reentrantLock;

import java.util.concurrent.locks.Condition;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;

/**
 * @Author: gpb
 * @Date: 2024/8/27 15:26
 * @Description:
 */
public class IReentrantLockExample {

    public static void main (String[] args) throws InterruptedException {
        Lock lock = new ReentrantLock();
        lock.lock();
        lock.tryLock();
        lock.lockInterruptibly();
        lock.unlock();
        Condition condition = lock.newCondition();
        condition.await();
        condition.signal();
        //
    }
}
